/**
 * 
 */
package com.cgbsoft.financial;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import com.cgbsoft.financial.update.UpdateApplication;
//import com.waps.AppConnect;

/**
 * @author CX
 *
 */
public class SystemSetting extends Activity implements OnClickListener {
	
	public final static String TAG = "SystemSetting";
	
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.system_setting);
		
		findViewById(R.id.check_update).setOnClickListener(this);
		findViewById(R.id.about).setOnClickListener(this);
		findViewById(R.id.disclaimer).setOnClickListener(this);
		findViewById(R.id.cancel_button).setOnClickListener(this);
		findViewById(R.id.OffersButton).setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch(v.getId()) {
		case R.id.check_update: {
			//开启线程检查更新
	        UpdateApplication.checkVersion(this);
			break;
		}
		case R.id.about: {
			Intent aboutIntent = new Intent(this, About.class);
			startActivity(aboutIntent);
			break;
		}
		case R.id.disclaimer: {
			Intent disclaimerIntent = new Intent(this, Disclaimer.class);
			startActivity(disclaimerIntent);
			break;
		}
		case R.id.cancel_button: {
			this.finish();
			break;
		}
		case R.id.OffersButton: {
			// 显示推荐应用列表（Offer）.
//			AppConnect.getInstance(this).showOffers(this);
			break;
		}
		default:
			break;
		}
		
	}
}
